﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Windows.Forms;
using Moonlite.ExtensionApi.ControlInterfaces;

namespace Moonlite.ExtensionApi.GlobalInterfaces
{
    public interface IMoonliteShell : IServiceProvider, IProjectEventManager
    {
        IProject Project { get; }
        string Text { get; set; }
        TextEditorCollection TextEditors { get; }
        List<Assembly> ExtensionAssemblies { get; }
        string ActiveSkinName { get; }
        string ProgramStatus { get; set; }
        IntPtr Handle { get; }
        string[] GetAllSkinNames();
        void SetSkin(string skinName);
        void CloseDocument(Form documentForm);
        bool CloseFile(bool prompt, bool removePage);
        bool CloseFile(ITextEditor editor, bool prompt, bool removePage);
        bool CloseProject(bool prompt);
        IProjectFile CreateFile();
        IProjectFile CreateFile(bool defaultFile);
        void CreateProject();
        void LaunchOpenProjectDialog();
        void OpenCurrentMapScript(int selectedRow, bool readOnly);
        void OpenDocument(string caption, Form documentForm);
        ITextEditor OpenFile(string filePath);
        ITextEditor OpenFile(string filePath, IProjectFile file);
        void OpenMapScript(int selectedRow, bool readOnly);
        void OpenProject(IProject project);
        IProject OpenProject(string filename, bool open);
        void Save();
        void SaveAllFiles();
        void SaveProject(bool saveFiles, bool saveSettings);
        void SaveAppSettings();
        void ViewProjectProperties();
        void RemoveTextEditor(ITextEditor editor);
        void UpdateEnabledItems(bool? currentTextEditor, bool? currentProject);
        void UpdateToolbars(bool currentTextEditor, bool currentProject);
        void UpdateRecentProjects();
        bool IsCurrentTabPageTextEditor();
        ITextEditor GetCurrentTabPageTextEditor();
        void RegisterService(object service, Type serviceType);
    }
}
